package com.example.weiba_app;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import android.app.Activity;
import android.content.res.AssetManager;
import android.os.Bundle;
import android.widget.EditText;
import android.widget.ListView;

public class Review extends Activity {

	private static AssetManager assetManager;
	private EditText inputBox;
	private ListView listview;


	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.fragment_event_listview);
		inputBox = new EditText(Review.this);
		listview = (ListView) findViewById(R.id.listview);
		List<Map<String,String>> datas = new ArrayList<Map<String,String>>();
		HashMap<String,String> data = new HashMap<String, String>();
		
		assetManager = getAssets();
		data.put("frilist_imageButton", "png1549.png");
	
		data.put("name", "name1");
		data.put("content", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
		datas.add(data);
		data = new HashMap<String, String>();
		data.put("frilist_imageButton", "png1550.png");
		data.put("name", "name2");
		data.put("content", "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
		datas.add(data);
		data = new HashMap<String, String>();
		data.put("frilist_imageButton", "png1551.png");
		data.put("name", "name3");
		data.put("content", "cccccccccccccccccccccccccccccccccccccccccccccccccccccc");
		datas.add(data);
		CustomAdapter ca = new CustomAdapter(this, datas, R.layout.review_main, null, null);
		listview.setAdapter(ca);
	}

	public static AssetManager getAssetManager() {
		return assetManager;
	}
	public static void setAssetManager(AssetManager assetManager) {
		Review.assetManager = assetManager;
	}
}
